﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using log4net.Appender;

namespace Quebec.Logging.Services.Server.Appenders
{
	/// <summary>
	/// A Custom appender that derives from the standard AdoNetAppender.
	/// The only change is that we force the this class to use the same
	/// ConnectionString as Milla.
	/// </summary>
	public class CustomAdoNetAppender : AdoNetAppender
	{
		public CustomAdoNetAppender(string connectionstring)
			: base()
		{
			ConnectionString = connectionstring;
		}
		public CustomAdoNetAppender()
			: base()
		{
			ConnectionStringSettingsCollection connections = ConfigurationManager.ConnectionStrings;
			ConnectionString = connections["LoggingConnectionString"].ConnectionString;
		}
	}
}
